//
//  BBRootNodeView.m
//  xNose
//
//  Created by ben smith on 12/09/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import "BBRootNodeView.h"
#import "BBNode.h"
#import "BBDefaultController.h"

@implementation BBRootNodeView

- (void)setupTextAttributes
{
	
}

-(void)setupView
{
	logo = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"verlagslogosmall" ofType:@"png"]];
}

-(NSRect)textRect
{
	float height = [BBDefaultController fontHeight:[self font]];
	return NSMakeRect(NSMidX(self.bounds) - (NSWidth(self.bounds)/4.0),   NSMaxY(self.bounds) - (height) - 10, NSWidth(self.bounds)/2.0, height);
}

-(NSColor*)fontColor 
{
	return [NSColor whiteColor];
}

-(void)drawNode
{
	[self.backgroundGradient drawInRect:self.bounds angle:250.0];
	return;
	NSSize imageSize = [logo size];
	NSPoint drawPoint = NSMakePoint(NSMaxX([self bounds]) - imageSize.width - 20, NSMaxY([self bounds]) - imageSize.height - 20);
	[logo drawInRect:NSMakeRect(drawPoint.x,drawPoint.y, imageSize.width, imageSize.height)
					fromRect:NSZeroRect 
				 operation:NSCompositeSourceOver 
					fraction:0.70];
}

@end
